/*
 * @Author: your name
 * @Date: 2020-06-12 16:18:14
 * @LastEditTime: 2020-06-15 15:14:51
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \codeSnippet\server\app\router.js
 */
'use strict'

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app
  router.get('/', controller.home.index)
  router.get('/captcha', controller.utils.index)

  router.group({ name: 'user', prefix: '/user' }, router => {
    const { register, login, info, verify, index } = controller.user
    router.get('/', index)
    router.post('/register', register)
    router.post('/login', login)
    router.get('/info', info)
    router.get('/verify', verify)

  })
  // router.get('/user', controller.user.index)
  // // 验证码

}
